package com.o2opay.car.model;

import com.o2opay.car.common.utils.DateUtil;
import com.o2opay.car.common.utils.UuidUtil;

import javax.persistence.Table;
import java.util.UUID;

/**
 * 车辆信息
 */
@Table(name="m_carinfo")
public class CarInfo extends PojoBase{

    /**
     * 车牌号
     */
    private String carNum;

    /**
     * 当前终端编号
     */
    private String eqpId;

    public String getCarNum() {
        return carNum;
    }

    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }

    public String getEqpId() {
        return eqpId;
    }

    public void setEqpId(String eqpId) {
        this.eqpId = eqpId;
    }

    public CarInfo(){};

    /**
     * 新增车辆信息
     * @param userName
     */
    public void addCarInfo(String userName){
        this.createUser = userName;
        this.updateUser = userName;
        this.id = UuidUtil.get32UUID();
        this.createDateTime = DateUtil.getCurDate("yyyyMMddHHmmss");
        this.updateDateTime = DateUtil.getCurDate("yyyyMMddHHmmss");
    }
}
